// ***************************************************************************************
// Copyright (c) 2023-2025 Peng Cheng Laboratory
// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences
// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip
//
// iEDA is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
//
// See the Mulan PSL v2 for more details.
// ***************************************************************************************
/*
 * @Author: Shijian Chen  chenshj@pcl.ac.cn
 * @Date: 2023-02-01 16:37:41
 * @LastEditors: Shijian Chen  chenshj@pcl.ac.cn
 * @LastEditTime: 2023-02-09 11:51:33
 * @FilePath: /irefactor/src/operation/iPL/source/module/legalizer_refactor/database/ContestRow.hh
 * @Description: Row data structure
 * 
 * 
 */
#ifndef IPL_ContestRow_H
#define IPL_ContestRow_H

#include <string>
#include <vector>

#include "Rectangle.hh"
#include "Orient.hh"
#include "Point.hh"
#include "contest_site.h"


namespace ieda_contest {
class ContestRow
{
public:
    ContestRow() = delete;
    ContestRow(const std::string row_name, ContestSite* site, const int32_t site_num);
    ContestRow(const ContestRow&) = delete;
    ContestRow(ContestRow&&) = delete;
    ~ContestRow() = default;

    ContestRow& operator=(const ContestRow&) = delete;
    ContestRow& operator=(ContestRow&&) = delete;

    // getter
    std::string get_name() const { return _name;}
    ContestSite* get_site() const { return _site;}
    int32_t get_site_num() const { return _site_num;}
    Point<int32_t> get_coordinate() const { return _coordinate;}
    idb::IdbOrient get_row_orient() const { return _orient;}
    
    // setter
    void set_coordinate(int32_t lx, int32_t ly) {_coordinate = Point<int32_t>(lx,ly);}
    void set_orient(idb::IdbOrient orient) { _orient = orient;}

private:
    std::string _name;
    ContestSite* _site;
    int32_t _site_num;
    Point<int32_t> _coordinate;
    idb::IdbOrient _orient;
};
inline ContestRow::ContestRow(std::string row_name, ContestSite* site, int32_t site_num): _name(row_name), _site(site), _site_num(site_num){}

};
#endif